473,461 Members | 1,991 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Writing to xlsx files

10
Hi, I am trying to write to data to a .xlsx file(Excel 2007). I can currently write the data to a .xls file. I tried to change the extension of the xls file (to xlsx) but Excel gave the following error:Excel cannot open the file 'Filename.xlsx' because the file format or file extent ion is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file.
I know Excel(2007) can open the xls file but I would like to save the data directly to a xlsx file.
Is it possible?, if not is there a way to automatically convert the file from the xls format to the xlsx format?
Any advice would be greatly appreciated
Thanks in advance
Jan 7 '09 #1
3 13212
Dormilich
8,658 Expert Mod 8TB
XLS and XSLX are two different file formats. you have to convert xls to xlsx to open the latter correctly. you can use for that Microsoft's own converter or get the appropriate OpenXML Doc for spreadsheets and rewrite your xls converter.

regards
Jan 7 '09 #2
wolfjmt
10
OK I do it that way
Thank for the quick reply and help
Jan 7 '09 #3
XSLX is just a Zip archive, you can open it programmaticaly with any library available for you, inside of it you willfind your XML source with data. To understand this format in depth just rename .xlsx extension into .zip and extract content on disk and just go through files you will see there. This will help you a lot. This valid for all Microsoft Office 2007 file formats.
Jan 9 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: SomeDude | last post by:
Hi, I have a question on file writing. I am not very experienced in Java programming. My hobby right now is to write an applet where 2 persons could play Go together (it is a board game). The...
2
by: George Marsaglia | last post by:
I have a set of, say, 2000 points in the 8-dimensional simplex S={(x_1,x_2,...,x_8),x_1+x_2+...+x_8=1, x's>=0}. To help analyze that 8-dimensional set, I wish to project the set of points onto...
6
by: guy | last post by:
Does .NET have a class or set of functions that facilitate the creating and writing of html files? I have been creating files in streams and constructing html strings and writing them out but it...
24
by: ypjofficial | last post by:
Hello all, I have written a class with many private data members.and i am putting it in a separate dll file. Now when i link that file while writing my main program module,natuarally i have to...
35
by: rbt | last post by:
I've been doing some file system benchmarking. In the process, I need to create a large file to copy around to various drives. I'm creating the file like this: fd = file('large_file.bin', 'wb')...
2
by: ShihChun | last post by:
Hi everyone, I encounter a problem in writing binary files for Sun Solaris system. The problem is I have an array (data type: double) need to be ported from PC to Sun Solaris workstation....
1
by: Michael Leithold, WWK | last post by:
Hello, is there a .NET library for writing log files? I'm looking for something to configure the log files. E.g. using date-/timestamps, deleting old log files, log file rotation for big log...
1
by: Doogie | last post by:
Hi, I am writing a script to export data to an excel file which works fine but I've seen one thing that is confusing. If I use the extension .xlsx, the file will get created, but Excel won't let...
5
by: wolfjmt | last post by:
Hi, I am trying to write to data to a .xlsx file. I can currently write the data to a .xls file. I tried to change the extension of the xls file (to xlsx) but Excel gave the following error:Excel...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.